import { http } from '@renderer/plugins/axios'

export default () => {
  function uploadImage(data: FormData) {
    return http.request<UploadResult>({
      url: '/uploadFile',
      method: 'post',
      data,
    })
  }
  function uploadAvatarImage(data: FormData) {
    return http.request<UploadResult>({
      url: '/uploadImage',
      method: 'post',
      data,
    })
  }
  return { uploadImage, uploadAvatarImage }
}
